<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="NCM维护记录" active="activeFlag[0]" ng-click="changeTab(0)">
            <div class="row wrapper-y-sm">
                <div class="operate-bar col-xs-4 font-0">
                </div>
                <div class="search-bar wrapper-none col-xs-8">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()" translate translate-attr-title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" translate translate-attr-title="配置表格列"
                                ng-click="switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                      
                        <div class="btn btn-default base-color">
                            <div translate translate-attr-title="导出">
                                <i class="yb-icon ico-export-o"></i>
                            </div>
                            <ul class="more-tool">
                                <li yb-download download-url="exportParam.sectionUrl" download-param="exportParam.sectionParam"
                                    download-key="ids">
                                    <i class="yb-icon ico-export-o"></i> <span translate>导出</span>
                                </li>
                                <li yb-download download-url="exportParam.allUrl" download-param="condition" download-duration="3">
                                    <i class="yb-icon ico-export-o"></i> <span translate>导出全部</span>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearch')" translate-attr-title="高级搜索" translate="高级搜索more"></button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" translate translate-attr-placeholder="零件编号"
                               ng-model="condition.materialsNo">
                        <span class="input-group-addon cursor-pointer" ng-click="search(1)" translate>搜索</span>
                    </div>
                </div>
            </div>
            <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)" reset-data="reset()"
                 date-picker="true"  hide-date="switchDataPicker()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>采购计划单号</span>：</label>
                        <input type="text" name="planOrder" ng-model="condition.planOrder" class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>零件编号</span>：</label>
                        <input type="text" name="materialsNo" ng-model="condition.materialsNo" class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>机型</span>：</label>
                        <input type="text" name="machineType" ng-model="condition.machineType" class="form-control">
                    </div>  

                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>采购方式</span>：</label>
                        <select class="form-control" ng-model="condition.typeId"
                            ng-options="item.code as (item.name|translate) for item in CGSelectList">
                            <option value="" translate>请选择</option>
                        </select>
                    </div> 
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>发运方式</span>：</label>
                        <select class="form-control" ng-model="condition.sendTypeId"
                            ng-options="item.code as (item.name|translate) for item in FYSelectList">
                            <option value="" translate>请选择</option>
                        </select>
                    </div>

                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>NCM码是否完成</span>：</label>
                        <select name="status" class="form-control" ng-model="condition.ncmStatus">
                            <option value="" translate>请选择</option>
                            <option value="N" translate>否</option>
                            <option value="S" translate>是</option>
                        </select>
                    </div>                        
                </div>
            </div>
            <div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tbConf" col-fixed="true"
                 has-check-col="true" set-tb-style="setFixedWidth()"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{tbConf.fixedWidth}}">
                            <thead>
                            <tr>
                                <th width="40" class="th-check text-center border-l-none">
                                    <div yb-check-box yb-checked="markInfo.allCheckedBill" yb-click="selectAll(dataList, 'Bill')"></div>
                                </th>
                                <th ng-repeat="itemCol in tbConf.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="tbConf.fixedWidth" fixed-width="tbStyle.fixedWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="tbStyle.fixedWidth">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in tbConf.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="tbConf.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="dataList.length > 0">
                        <table class="table-fixed border-none" width="{{tbConf.fixedWidth}}">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index" ng-click="selectRow($index)"
                                ng-class="{'row-selected': $index === markInfo.curRow}">
                                <td width="40" class="text-center border-l-none">
                                    <div yb-check-box yb-checked="item.isChecked" yb-click="selectSingle(item, dataList, 'Bill')"></div>
                                </td>
                                <td class="spill-dots" ng-repeat="itemCol in tbConf.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-show="!!itemCol.isShow && !!itemCol.isFixed" title="{{item[itemCol.dataField]}}">
                                    <span ng-if="(!itemCol.clickFn && itemCol.type !== 'operate') || !!itemCol.clickFn && itemCol.type == 'synSap' && item[itemCol.dataField] != '同步失败'">{{item[itemCol.dataField]}}</span>
                                    <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)" ng-if="(!!itemCol.clickFn && itemCol.type != 'synSap') || (!!itemCol.clickFn && itemCol.type == 'synSap' && item[itemCol.dataField] == '同步失败')">
                                        {{item[itemCol.dataField]}}
                                    </a>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.fixedWidth">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index" ng-click="selectRow($index)"
                                ng-class="{'row-selected': $index === markInfo.curRow}" >
                                <td class="spill-dots" ng-repeat="itemCol in tbConf.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-show="!!itemCol.isShow && !itemCol.isFixed" title="{{item[itemCol.dataField]}}">
                                    <span ng-if="(!itemCol.clickFn && itemCol.type !== 'operate') || !!itemCol.clickFn && itemCol.type == 'synSap' && item[itemCol.dataField] != '同步失败'">{{item[itemCol.dataField]}}</span>
                                    <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)" ng-if="(!!itemCol.clickFn && itemCol.type != 'synSap') || (!!itemCol.clickFn && itemCol.type == 'synSap' && item[itemCol.dataField] == '同步失败')">
                                        {{item[itemCol.dataField]}}
                                    </a>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0" translate>暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-check-box class="m-t-xs m-r-sm" yb-checked="markInfo.allCheckedBill" yb-check-name="全选"
                     yb-click="selectAll(dataList, 'Bill')"></div>
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>
    </div>
</div>